<?php /* Smarty version Smarty-3.1.13, created on 2014-10-31 20:11:15
         compiled from "D:\workspace\php\cms\templates\admin\seo\sitemap.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2184654537c639c6383-59549460%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '0f5ff9e8b04e4a4d030cebd21ba70ff9cdd151a7' => 
    array (
      0 => 'D:\\workspace\\php\\cms\\templates\\admin\\seo\\sitemap.tpl',
      1 => 1414419523,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2184654537c639c6383-59549460',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'sitemaps' => 0,
    'sitemap' => 0,
    'prioritys' => 0,
    'priority' => 0,
    'changefreqs' => 0,
    'changefreq' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_54537c63b644e7_12400412',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_54537c63b644e7_12400412')) {function content_54537c63b644e7_12400412($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("admin/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("admin/navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("admin/sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


<div class="content">

    <!-- 表格头部开始 -->
    <div class="header">
        <div class="stats"><p class="stat"></p>
        </div>
        <h1 class="page-title">Sitemap生成器</h1>
    </div>
    <!-- 表格头部结束 -->

	<div class="container-fluid">
		<div class="row-fluid">
         <br/>
            <div id="myTabContent" class="tab-content">
                <div class="tab-pane fade active in" id="home">
                    <p>
                    <form class="form-horizontal">
                        <?php  $_smarty_tpl->tpl_vars['sitemap'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['sitemap']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['sitemaps']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['sitemap']->key => $_smarty_tpl->tpl_vars['sitemap']->value){
$_smarty_tpl->tpl_vars['sitemap']->_loop = true;
?>
                        <div class="control-group">
                            <label class="control-label" for="<?php echo $_smarty_tpl->tpl_vars['sitemap']->value->id;?>
">
                                <span class="label label-success"><?php echo $_smarty_tpl->tpl_vars['sitemap']->value->type;?>
</span>
                            </label>

                            <div class="controls">
                                优先级(priority):
                                <select class="span2" id="<?php echo $_smarty_tpl->tpl_vars['sitemap']->value->id;?>
_priority">
                                    <?php  $_smarty_tpl->tpl_vars['priority'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['priority']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['prioritys']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['priority']->key => $_smarty_tpl->tpl_vars['priority']->value){
$_smarty_tpl->tpl_vars['priority']->_loop = true;
?>
                                      <option value="<?php echo $_smarty_tpl->tpl_vars['priority']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['priority']->value==$_smarty_tpl->tpl_vars['sitemap']->value->priority){?>selected="" <?php }?>><?php echo $_smarty_tpl->tpl_vars['priority']->value;?>
</option>
                                    <?php } ?>
                                </select>&nbsp;&nbsp;
                                更新频率(changefreq):
                                <select id="<?php echo $_smarty_tpl->tpl_vars['sitemap']->value->id;?>
_changefreq"  class="span2">
                                    <?php  $_smarty_tpl->tpl_vars['changefreq'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['changefreq']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['changefreqs']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['changefreq']->key => $_smarty_tpl->tpl_vars['changefreq']->value){
$_smarty_tpl->tpl_vars['changefreq']->_loop = true;
?>
                                    <option value="<?php echo $_smarty_tpl->tpl_vars['changefreq']->value;?>
" <?php if ($_smarty_tpl->tpl_vars['changefreq']->value==$_smarty_tpl->tpl_vars['sitemap']->value->changefreq){?>selected="" <?php }?>><?php echo $_smarty_tpl->tpl_vars['changefreq']->value;?>
</option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
                        <?php } ?>

                        <div class="control-group">
                            <div class="controls">
                                <button type="button" class="btn btn-primary" onclick="updateSitemap();">生成网站SiteMap</button>
                            </div>
                        </div>
                    </form>
                    </p>
                </div>



        </div>
	</div>
</div>

<script src="<?php echo @constant('WEBSITE_URL');?>
public/assets/layer/layer.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("[href^='#']").click(function (){location.hash=$(this).attr("href"); return false;});

    });
 function updateSitemap(){
     var obj={};


         obj.index_changefreq = $("#index_changefreq").val();
         obj.index_priority = $("#index_priority").val();
         obj.tag_changefreq = $("#tag_changefreq").val();
         obj.tag_priority = $("#tag_priority").val();
     obj.post_changefreq = $("#post_changefreq").val();
     obj.post_priority = $("#post_priority").val();
     obj.category_changefreq = $("#category_changefreq").val();
     obj.category_priority = $("#category_priority").val();
     obj.otherpage_changefreq = $("#otherpage_changefreq").val();
     obj.otherpage_priority = $("#otherpage_priority").val();

        $.post('admin/sitemap/update', obj,
             function( data ) {
                 if(data.success){
                     $.post('admin/sitemap/mksitemap', {},
                             function( data ) {
                                 $.layer({
                                     area : ['auto','auto'],
                                     dialog : {msg:'设置成功',type : 1}
                                 });
                             }
                   ,"json");

                 }else{
                     $.layer({
                         area : ['auto','auto'],
                         dialog : {msg:'设置失败',type : 1}
                     });
                 }
             },  "json");
 }
</script>
<?php echo $_smarty_tpl->getSubTemplate ("admin/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


<?php }} ?>